<h:panelGroup xmlns:h='http://java.sun.com/jsf/html'
              xmlns:f='http://java.sun.com/jsf/core'
              xmlns:p='http://primefaces.org/ui'
              xmlns:z='http://savanti.com.bo/ui'
              xmlns:x='http://java.sun.com/jsf/composite/ui/component' styleClass='IIBalanceGeneral' id='IIBalanceGeneral'><p:growl/>

<p:toolbar styleClass='toolBar'><p:toolbarGroup style='width:100%;text-align: center'>

<p:commandButton icon='ui-icon-new'  title='Nuevo'  actionListener='#{IIBalanceGeneral.uiClean}' update='@(.IIBalanceGeneral)' style='border:none; float:left;  width:70px'/>

<p:commandButton icon='ui-icon-find' title='Buscar' actionListener='#{IIBalanceGeneral.uiFind}'  update='@(.IIBalanceGeneral)' style='border:none; float:right; width:70px'/>

<h:panelGroup>Practicado al <h:outputText value='#{IIBalanceGeneral.dateEnd}'><f:convertDateTime dateStyle='long'/></h:outputText></h:panelGroup>

</p:toolbarGroup></p:toolbar>


<h:panelGroup>

<h:panelGrid columns='2' cellpadding='8' width='100%'>

  <x:beanPanel id='hd' bean='#{IIBalanceGeneral}' title='Expresado en Bolivianos' cellpadding='5' columns='3'>

  <x:fieldN b='#{IIBalanceGeneral}' t='Activo'  v='#{IIBalanceGeneral.lsActivo[0].saldo}'/>

  <x:fieldN b='#{IIBalanceGeneral}' t='Pasivo'  v='#{IIBalanceGeneral.lsPasivo[0].saldo}'/>

  <x:fieldN b='#{IIBalanceGeneral}' t='Capital' v='#{IIBalanceGeneral.lsCapital[0].saldo}'/>

  </x:beanPanel>


  <x:beanPanel id='ps' bean='#{IIBalanceGeneral}' title='Buscar' cellpadding='3' columns='3'>

  <x:fieldD b='#{IIBalanceGeneral}' t='Desde' v='#{IIBalanceGeneral.dateIni}' w='70px'/>

  <x:fieldD b='#{IIBalanceGeneral}' t='Hasta' v='#{IIBalanceGeneral.dateEnd}' w='70px'/>

  <x:fieldL b='#{IIBalanceGeneral}' t='Nivel' v='#{IIBalanceGeneral.nivel}' list='#{IIBalanceGeneral.lsNivel}' w='50px' x='s'/>

  </x:beanPanel>

</h:panelGrid>

</h:panelGroup>


<h:panelGrid columns='2' cellpadding='8' width='100%' styleClass='align-top'>

    <p:dataTable rowIndexVar='i' value='#{IIBalanceGeneral.lsActivo}' var='x' rendered='#{not empty IIBalanceGeneral.lsActivo}' rowStyleClass='rowN#{x.tipo lt 4? (x.nivel-1) : 4}' style='width:450px'>

        <f:facet name='header'>ACTIVO <z:outputN v='#{IIBalanceGeneral.lsActivo[0].saldo}'/></f:facet>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsActivo[i].nivel le IIBalanceGeneral.nivel}'><h:outputText value="#{x.signo > 0? '' : '-'} #{x.nombre}" style='white-space:normal'/></p:column>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsActivo[i].nivel le IIBalanceGeneral.nivel}' style='width:50px'><z:outputN v='#{x.nivel >3? x.saldo : null}'/> </p:column>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsActivo[i].nivel le IIBalanceGeneral.nivel}' style='width:50px'><z:outputN v='#{x.nivel==3? x.saldo : null}'/> </p:column>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsActivo[i].nivel le IIBalanceGeneral.nivel}' style='width:50px'><z:outputN v='#{x.nivel==2? x.saldo : null}'/> </p:column>

    </p:dataTable>

    <h:panelGrid columns='1' cellpadding='0' cellspacing='0' style='float: right'>

    <p:dataTable rowIndexVar='i' value='#{IIBalanceGeneral.lsPasivo}' var='x' rendered='#{not empty IIBalanceGeneral.lsPasivo}' rowStyleClass='rowN#{x.tipo lt 4? (x.nivel-1) : 4}' style='width:450px'>

    <f:facet name='header'>PASIVO<z:outputN v='#{IIBalanceGeneral.lsPasivo[0].saldo}'/></f:facet>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsPasivo[i].nivel le IIBalanceGeneral.nivel}'><h:outputText value="#{x.signo > 0? '' : '-'} #{x.nombre}" style='white-space:normal'/></p:column>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsPasivo[i].nivel le IIBalanceGeneral.nivel}' style='width:50px'><z:outputN v='#{x.nivel >3? x.saldo : null}'/> </p:column>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsPasivo[i].nivel le IIBalanceGeneral.nivel}' style='width:50px'><z:outputN v='#{x.nivel==3? x.saldo : null}'/> </p:column>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsPasivo[i].nivel le IIBalanceGeneral.nivel}' style='width:50px'><z:outputN v='#{x.nivel==2? x.saldo : null}'/> </p:column>

    </p:dataTable> <br/><br/><br/>


    <p:dataTable rowIndexVar='i' value='#{IIBalanceGeneral.lsCapital}' var='x' rendered='#{not empty IIBalanceGeneral.lsCapital}' rowStyleClass='rowN#{x.tipo lt 4? (x.nivel-1) : 4}' style='width:450px'>

    <f:facet name='header'>CAPITAL <z:outputN v='#{IIBalanceGeneral.lsCapital[0].saldo}'/></f:facet>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsCapital[i].nivel le IIBalanceGeneral.nivel}'><h:outputText value="#{x.signo > 0? '' : '-'} #{x.nombre}" style='white-space:normal'/></p:column>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsCapital[i].nivel le IIBalanceGeneral.nivel}' style='width:50px'><z:outputN v='#{x.nivel >3? x.saldo : null}'/> </p:column>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsCapital[i].nivel le IIBalanceGeneral.nivel}' style='width:50px'><z:outputN v='#{x.nivel==3? x.saldo : null}'/> </p:column>

    <p:column rendered='#{i != 0 and IIBalanceGeneral.lsCapital[i].nivel le IIBalanceGeneral.nivel}' style='width:50px'><z:outputN v='#{x.nivel==2? x.saldo : null}'/> </p:column>

    </p:dataTable>

  </h:panelGrid>

</h:panelGrid>

</h:panelGroup>  